3.371 \(\int \frac{\tan ^2(e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\)

Optimal. Leaf size=138 \[ \frac{\left (3 a^2+12 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 a^3 \sqrt{b} f (a+b)^{3/2}}+\frac{(3 a+4 b) \tan (e+f x)}{8 a^2 f (a+b) \left (a+b \tan ^2(e+f x)+b\right )}-\frac{x}{a^3}+\frac{\tan (e+f x)}{4 a f \left (a+b \tan ^2(e+f x)+b\right )^2} \]

[Out]

-(x/a^3) + ((3*a^2 + 12*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(8*a^3*Sqrt[b]*(a + b)^(3/2)*
f) + Tan[e + f*x]/(4*a*f*(a + b + b*Tan[e + f*x]^2)^2) + ((3*a + 4*b)*Tan[e + f*x])/(8*a^2*(a + b)*f*(a + b +
b*Tan[e + f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.227172, antiderivative size = 138, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {4141, 1975, 471, 527, 522, 203, 205} \[ \frac{\left (3 a^2+12 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 a^3 \sqrt{b} f (a+b)^{3/2}}+\frac{(3 a+4 b) \tan (e+f x)}{8 a^2 f (a+b) \left (a+b \tan ^2(e+f x)+b\right )}-\frac{x}{a^3}+\frac{\tan (e+f x)}{4 a f \left (a+b \tan ^2(e+f x)+b\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^2/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

-(x/a^3) + ((3*a^2 + 12*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(8*a^3*Sqrt[b]*(a + b)^(3/2)*
f) + Tan[e + f*x]/(4*a*f*(a + b + b*Tan[e + f*x]^2)^2) + ((3*a + 4*b)*Tan[e + f*x])/(8*a^2*(a + b)*f*(a + b +
b*Tan[e + f*x]^2))

Rule 4141

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[((d*ff*x)^m*(a + b*(1 + ff^2*x^2)^(n/2))^p)/(1 + ff^
2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] && IntegerQ[n/2] && (IntegerQ[m/2] ||
EqQ[n, 2])

Rule 1975

Int[(u_)^(p_.)*(v_)^(q_.)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[(e*x)^m*ExpandToSum[u, x]^p*ExpandToSum[v, x]^q
, x] /; FreeQ[{e, m, p, q}, x] && BinomialQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0]
&&  !BinomialMatchQ[{u, v}, x]

Rule 471

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(e^(n -
1)*(e*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(n*(b*c - a*d)*(p + 1)), x] - Dist[e^n/(n*(b*c -
 a*d)*(p + 1)), Int[(e*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(m - n + 1) + d*(m + n*(p + q + 1)
+ 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p, -1] && GeQ[n
, m - n + 1] && GtQ[m - n + 1, 0] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 527

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> -Simp[
((b*e - a*f)*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d
)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)
*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\tan ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2}{\left (1+x^2\right ) \left (a+b \left (1+x^2\right )\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \frac{x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\tan (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{\operatorname{Subst}\left (\int \frac{1-3 x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 a f}\\ &=\frac{\tan (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac{(3 a+4 b) \tan (e+f x)}{8 a^2 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{5 a+4 b+(-3 a-4 b) x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{8 a^2 (a+b) f}\\ &=\frac{\tan (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac{(3 a+4 b) \tan (e+f x)}{8 a^2 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{a^3 f}+\frac{\left (3 a^2+12 a b+8 b^2\right ) \operatorname{Subst}\left (\int \frac{1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{8 a^3 (a+b) f}\\ &=-\frac{x}{a^3}+\frac{\left (3 a^2+12 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 a^3 \sqrt{b} (a+b)^{3/2} f}+\frac{\tan (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac{(3 a+4 b) \tan (e+f x)}{8 a^2 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )}\\ \end{align*}

Mathematica [C]  time = 13.2285, size = 1473, normalized size = 10.67 \[ \frac{(\cos (2 e+2 f x) a+a+2 b)^3 \left (\frac{\left (3 a^2+8 b a+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{(a+b)^{5/2}}-\frac{a \sqrt{b} \left (3 a^2+16 b a+3 (a+2 b) \cos (2 (e+f x)) a+16 b^2\right ) \sin (2 (e+f x))}{(a+b)^2 (\cos (2 (e+f x)) a+a+2 b)^2}\right ) \sec ^6(e+f x)}{1024 b^{5/2} f \left (b \sec ^2(e+f x)+a\right )^3}+\frac{(\cos (2 e+2 f x) a+a+2 b)^3 \left (\frac{\sqrt{b} \left (3 a^3+14 b a^2+24 b^2 a+\left (3 a^2+4 b a+4 b^2\right ) \cos (2 (e+f x)) a+16 b^3\right ) \sin (2 (e+f x))}{(a+b)^2 (\cos (2 (e+f x)) a+a+2 b)^2}-\frac{3 a (a+2 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{(a+b)^{5/2}}\right ) \sec ^6(e+f x)}{2048 b^{5/2} f \left (b \sec ^2(e+f x)+a\right )^3}-\frac{(\cos (2 e+2 f x) a+a+2 b)^3 \left (\frac{2 \left (3 a^5-10 b a^4+80 b^2 a^3+480 b^3 a^2+640 b^4 a+256 b^5\right ) \tan ^{-1}\left (\frac{\sec (f x) (\cos (2 e)-i \sin (2 e)) (a \sin (2 e+f x)-(a+2 b) \sin (f x))}{2 \sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}\right ) (\cos (2 e)-i \sin (2 e))}{\sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}+\frac{\sec (2 e) \left (-9 \sin (2 e) a^6+9 \sin (2 f x) a^6+3 \sin (2 (e+2 f x)) a^6-3 \sin (4 e+2 f x) a^6+12 b \sin (2 e) a^5-14 b \sin (2 f x) a^5-12 b \sin (2 (e+2 f x)) a^5+10 b \sin (4 e+2 f x) a^5+128 b^2 f x \cos (2 (e+2 f x)) a^4+512 b^2 f x \cos (4 e+2 f x) a^4+128 b^2 f x \cos (6 e+4 f x) a^4+684 b^2 \sin (2 e) a^4-608 b^2 \sin (2 f x) a^4-204 b^2 \sin (2 (e+2 f x)) a^4+304 b^2 \sin (4 e+2 f x) a^4+256 b^3 f x \cos (2 (e+2 f x)) a^3+2048 b^3 f x \cos (4 e+2 f x) a^3+256 b^3 f x \cos (6 e+4 f x) a^3+2880 b^3 \sin (2 e) a^3-2112 b^3 \sin (2 f x) a^3-384 b^3 \sin (2 (e+2 f x)) a^3+1056 b^3 \sin (4 e+2 f x) a^3+128 b^4 f x \cos (2 (e+2 f x)) a^2+2560 b^4 f x \cos (4 e+2 f x) a^2+128 b^4 f x \cos (6 e+4 f x) a^2+5280 b^4 \sin (2 e) a^2-2560 b^4 \sin (2 f x) a^2-192 b^4 \sin (2 (e+2 f x)) a^2+1280 b^4 \sin (4 e+2 f x) a^2+512 b^2 (a+b)^2 (a+2 b) f x \cos (2 f x) a+1024 b^5 f x \cos (4 e+2 f x) a+4608 b^5 \sin (2 e) a-1024 b^5 \sin (2 f x) a+512 b^5 \sin (4 e+2 f x) a+256 b^2 (a+b)^2 \left (3 a^2+8 b a+8 b^2\right ) f x \cos (2 e)+1536 b^6 \sin (2 e)\right )}{(\cos (2 (e+f x)) a+a+2 b)^2}\right ) \sec ^6(e+f x)}{4096 a^3 b^2 (a+b)^2 f \left (b \sec ^2(e+f x)+a\right )^3}-\frac{(\cos (2 e+2 f x) a+a+2 b)^3 \left (\frac{a \sec (2 e) \left (\left (-9 a^4-16 b a^3+48 b^2 a^2+128 b^3 a+64 b^4\right ) \sin (2 f x)+a \left (-3 a^3+2 b a^2+24 b^2 a+16 b^3\right ) \sin (2 (e+2 f x))+\left (3 a^4-64 b^2 a^2-128 b^3 a-64 b^4\right ) \sin (4 e+2 f x)\right )+\left (9 a^5+18 b a^4-64 b^2 a^3-256 b^3 a^2-320 b^4 a-128 b^5\right ) \tan (2 e)}{a^2 (\cos (2 (e+f x)) a+a+2 b)^2}-\frac{6 a^2 \tan ^{-1}\left (\frac{\sec (f x) (\cos (2 e)-i \sin (2 e)) (a \sin (2 e+f x)-(a+2 b) \sin (f x))}{2 \sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}\right ) (\cos (2 e)-i \sin (2 e))}{\sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}\right ) \sec ^6(e+f x)}{2048 b^2 (a+b)^2 f \left (b \sec ^2(e+f x)+a\right )^3} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Tan[e + f*x]^2/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

((a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x]^6*(((3*a^2 + 8*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[
a + b]])/(a + b)^(5/2) - (a*Sqrt[b]*(3*a^2 + 16*a*b + 16*b^2 + 3*a*(a + 2*b)*Cos[2*(e + f*x)])*Sin[2*(e + f*x)
])/((a + b)^2*(a + 2*b + a*Cos[2*(e + f*x)])^2)))/(1024*b^(5/2)*f*(a + b*Sec[e + f*x]^2)^3) + ((a + 2*b + a*Co
s[2*e + 2*f*x])^3*Sec[e + f*x]^6*((-3*a*(a + 2*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(a + b)^(5/2) +
(Sqrt[b]*(3*a^3 + 14*a^2*b + 24*a*b^2 + 16*b^3 + a*(3*a^2 + 4*a*b + 4*b^2)*Cos[2*(e + f*x)])*Sin[2*(e + f*x)])
/((a + b)^2*(a + 2*b + a*Cos[2*(e + f*x)])^2)))/(2048*b^(5/2)*f*(a + b*Sec[e + f*x]^2)^3) - ((a + 2*b + a*Cos[
2*e + 2*f*x])^3*Sec[e + f*x]^6*((2*(3*a^5 - 10*a^4*b + 80*a^3*b^2 + 480*a^2*b^3 + 640*a*b^4 + 256*b^5)*ArcTan[
(Sec[f*x]*(Cos[2*e] - I*Sin[2*e])*(-((a + 2*b)*Sin[f*x]) + a*Sin[2*e + f*x]))/(2*Sqrt[a + b]*Sqrt[b*(Cos[e] -
I*Sin[e])^4])]*(Cos[2*e] - I*Sin[2*e]))/(Sqrt[a + b]*Sqrt[b*(Cos[e] - I*Sin[e])^4]) + (Sec[2*e]*(256*b^2*(a +
b)^2*(3*a^2 + 8*a*b + 8*b^2)*f*x*Cos[2*e] + 512*a*b^2*(a + b)^2*(a + 2*b)*f*x*Cos[2*f*x] + 128*a^4*b^2*f*x*Cos
[2*(e + 2*f*x)] + 256*a^3*b^3*f*x*Cos[2*(e + 2*f*x)] + 128*a^2*b^4*f*x*Cos[2*(e + 2*f*x)] + 512*a^4*b^2*f*x*Co
s[4*e + 2*f*x] + 2048*a^3*b^3*f*x*Cos[4*e + 2*f*x] + 2560*a^2*b^4*f*x*Cos[4*e + 2*f*x] + 1024*a*b^5*f*x*Cos[4*
e + 2*f*x] + 128*a^4*b^2*f*x*Cos[6*e + 4*f*x] + 256*a^3*b^3*f*x*Cos[6*e + 4*f*x] + 128*a^2*b^4*f*x*Cos[6*e + 4
*f*x] - 9*a^6*Sin[2*e] + 12*a^5*b*Sin[2*e] + 684*a^4*b^2*Sin[2*e] + 2880*a^3*b^3*Sin[2*e] + 5280*a^2*b^4*Sin[2
*e] + 4608*a*b^5*Sin[2*e] + 1536*b^6*Sin[2*e] + 9*a^6*Sin[2*f*x] - 14*a^5*b*Sin[2*f*x] - 608*a^4*b^2*Sin[2*f*x
] - 2112*a^3*b^3*Sin[2*f*x] - 2560*a^2*b^4*Sin[2*f*x] - 1024*a*b^5*Sin[2*f*x] + 3*a^6*Sin[2*(e + 2*f*x)] - 12*
a^5*b*Sin[2*(e + 2*f*x)] - 204*a^4*b^2*Sin[2*(e + 2*f*x)] - 384*a^3*b^3*Sin[2*(e + 2*f*x)] - 192*a^2*b^4*Sin[2
*(e + 2*f*x)] - 3*a^6*Sin[4*e + 2*f*x] + 10*a^5*b*Sin[4*e + 2*f*x] + 304*a^4*b^2*Sin[4*e + 2*f*x] + 1056*a^3*b
^3*Sin[4*e + 2*f*x] + 1280*a^2*b^4*Sin[4*e + 2*f*x] + 512*a*b^5*Sin[4*e + 2*f*x]))/(a + 2*b + a*Cos[2*(e + f*x
)])^2))/(4096*a^3*b^2*(a + b)^2*f*(a + b*Sec[e + f*x]^2)^3) - ((a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x]^6
*((-6*a^2*ArcTan[(Sec[f*x]*(Cos[2*e] - I*Sin[2*e])*(-((a + 2*b)*Sin[f*x]) + a*Sin[2*e + f*x]))/(2*Sqrt[a + b]*
Sqrt[b*(Cos[e] - I*Sin[e])^4])]*(Cos[2*e] - I*Sin[2*e]))/(Sqrt[a + b]*Sqrt[b*(Cos[e] - I*Sin[e])^4]) + (a*Sec[
2*e]*((-9*a^4 - 16*a^3*b + 48*a^2*b^2 + 128*a*b^3 + 64*b^4)*Sin[2*f*x] + a*(-3*a^3 + 2*a^2*b + 24*a*b^2 + 16*b
^3)*Sin[2*(e + 2*f*x)] + (3*a^4 - 64*a^2*b^2 - 128*a*b^3 - 64*b^4)*Sin[4*e + 2*f*x]) + (9*a^5 + 18*a^4*b - 64*
a^3*b^2 - 256*a^2*b^3 - 320*a*b^4 - 128*b^5)*Tan[2*e])/(a^2*(a + 2*b + a*Cos[2*(e + f*x)])^2)))/(2048*b^2*(a +
 b)^2*f*(a + b*Sec[e + f*x]^2)^3)

________________________________________________________________________________________

Maple [B]  time = 0.096, size = 263, normalized size = 1.9 \begin{align*} -{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) }{f{a}^{3}}}+{\frac{3\,b \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{8\,fa \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2} \left ( a+b \right ) }}+{\frac{{b}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{2\,f{a}^{2} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2} \left ( a+b \right ) }}+{\frac{5\,\tan \left ( fx+e \right ) }{8\,fa \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{b\tan \left ( fx+e \right ) }{2\,f{a}^{2} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{3}{8\,fa \left ( a+b \right ) }\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}+{\frac{3\,b}{2\,f{a}^{2} \left ( a+b \right ) }\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}+{\frac{{b}^{2}}{f{a}^{3} \left ( a+b \right ) }\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^2/(a+b*sec(f*x+e)^2)^3,x)

[Out]

-1/f/a^3*arctan(tan(f*x+e))+3/8/f/a/(a+b+b*tan(f*x+e)^2)^2*b/(a+b)*tan(f*x+e)^3+1/2/f/a^2/(a+b+b*tan(f*x+e)^2)
^2*b^2/(a+b)*tan(f*x+e)^3+5/8*tan(f*x+e)/a/f/(a+b+b*tan(f*x+e)^2)^2+1/2*b*tan(f*x+e)/a^2/f/(a+b+b*tan(f*x+e)^2
)^2+3/8/f/a/(a+b)/((a+b)*b)^(1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))+3/2/f/a^2/(a+b)/((a+b)*b)^(1/2)*arctan(
tan(f*x+e)*b/((a+b)*b)^(1/2))*b+1/f/a^3/(a+b)/((a+b)*b)^(1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))*b^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.713179, size = 1910, normalized size = 13.84 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

[-1/32*(32*(a^4*b + 2*a^3*b^2 + a^2*b^3)*f*x*cos(f*x + e)^4 + 64*(a^3*b^2 + 2*a^2*b^3 + a*b^4)*f*x*cos(f*x + e
)^2 + 32*(a^2*b^3 + 2*a*b^4 + b^5)*f*x + ((3*a^4 + 12*a^3*b + 8*a^2*b^2)*cos(f*x + e)^4 + 3*a^2*b^2 + 12*a*b^3
 + 8*b^4 + 2*(3*a^3*b + 12*a^2*b^2 + 8*a*b^3)*cos(f*x + e)^2)*sqrt(-a*b - b^2)*log(((a^2 + 8*a*b + 8*b^2)*cos(
f*x + e)^4 - 2*(3*a*b + 4*b^2)*cos(f*x + e)^2 + 4*((a + 2*b)*cos(f*x + e)^3 - b*cos(f*x + e))*sqrt(-a*b - b^2)
*sin(f*x + e) + b^2)/(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 + b^2)) - 4*((5*a^4*b + 11*a^3*b^2 + 6*a^2*b^3
)*cos(f*x + e)^3 + (3*a^3*b^2 + 7*a^2*b^3 + 4*a*b^4)*cos(f*x + e))*sin(f*x + e))/((a^7*b + 2*a^6*b^2 + a^5*b^3
)*f*cos(f*x + e)^4 + 2*(a^6*b^2 + 2*a^5*b^3 + a^4*b^4)*f*cos(f*x + e)^2 + (a^5*b^3 + 2*a^4*b^4 + a^3*b^5)*f),
-1/16*(16*(a^4*b + 2*a^3*b^2 + a^2*b^3)*f*x*cos(f*x + e)^4 + 32*(a^3*b^2 + 2*a^2*b^3 + a*b^4)*f*x*cos(f*x + e)
^2 + 16*(a^2*b^3 + 2*a*b^4 + b^5)*f*x + ((3*a^4 + 12*a^3*b + 8*a^2*b^2)*cos(f*x + e)^4 + 3*a^2*b^2 + 12*a*b^3
+ 8*b^4 + 2*(3*a^3*b + 12*a^2*b^2 + 8*a*b^3)*cos(f*x + e)^2)*sqrt(a*b + b^2)*arctan(1/2*((a + 2*b)*cos(f*x + e
)^2 - b)/(sqrt(a*b + b^2)*cos(f*x + e)*sin(f*x + e))) - 2*((5*a^4*b + 11*a^3*b^2 + 6*a^2*b^3)*cos(f*x + e)^3 +
 (3*a^3*b^2 + 7*a^2*b^3 + 4*a*b^4)*cos(f*x + e))*sin(f*x + e))/((a^7*b + 2*a^6*b^2 + a^5*b^3)*f*cos(f*x + e)^4
 + 2*(a^6*b^2 + 2*a^5*b^3 + a^4*b^4)*f*cos(f*x + e)^2 + (a^5*b^3 + 2*a^4*b^4 + a^3*b^5)*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**2/(a+b*sec(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.64476, size = 244, normalized size = 1.77 \begin{align*} \frac{\frac{{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (f x + e\right )}{\sqrt{a b + b^{2}}}\right )\right )}{\left (3 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )}}{{\left (a^{4} + a^{3} b\right )} \sqrt{a b + b^{2}}} + \frac{3 \, a b \tan \left (f x + e\right )^{3} + 4 \, b^{2} \tan \left (f x + e\right )^{3} + 5 \, a^{2} \tan \left (f x + e\right ) + 9 \, a b \tan \left (f x + e\right ) + 4 \, b^{2} \tan \left (f x + e\right )}{{\left (a^{3} + a^{2} b\right )}{\left (b \tan \left (f x + e\right )^{2} + a + b\right )}^{2}} - \frac{8 \,{\left (f x + e\right )}}{a^{3}}}{8 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")

[Out]

1/8*((pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b + b^2)))*(3*a^2 + 12*a*b + 8*b^2)/(
(a^4 + a^3*b)*sqrt(a*b + b^2)) + (3*a*b*tan(f*x + e)^3 + 4*b^2*tan(f*x + e)^3 + 5*a^2*tan(f*x + e) + 9*a*b*tan
(f*x + e) + 4*b^2*tan(f*x + e))/((a^3 + a^2*b)*(b*tan(f*x + e)^2 + a + b)^2) - 8*(f*x + e)/a^3)/f